<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>영화관</title>
	
	<link type="text/css" rel="stylesheet" href="/spring-GOP/css/common.css">
	<link type="text/css" rel="stylesheet" href="/spring-GOP/css/style.css">
	<link type="text/css" rel="stylesheet"	href="/spring-GOP/css/member/style_50.css">
	<link type="text/css" rel="stylesheet"	href="/spring-GOP/css/member/style_5030.css">
	<link type="text/css" rel="stylesheet" href="/spring-GOP/css/member/style_9010.css">
</head>

<script type="text/javascript">
function delMember(idx){
	var id = document.getElementById("outM"+idx).value;

	if(!confirm("강제탈퇴 하시겠습니까?")) return;
	else document.location="/spring-GOP/admin/member/delMember?member_id="+id;
}


function search(){

	var select = document.getElementById("search_select").value;
	var text = document.getElementById("search_text").value;
	
	if(select == ""){
		alert("검색조건을 선택해주세요.");
		search_select.focus();
		return;
	}else if(text == ""){
		alert("내용을 입력해주세요.");
		search_text.focus();
		return;
	}	
	document.forms["searchFrm"].submit();
	
}
</script>
<body>
<form id="searchFrm" method="post">
	<!-- container -->
	<div id="container"
	style="margin-top: 24px; margin-top: 22px\0IE8; *margin-top: 8px;">
		<!-- content -->
		<div id="content">
			<div id="main-shortCut">
				<div class="sub-main-section">
					<div class="page-type3">
						<h2>
							<p>Primus 관리자</p>
							Primus <span>회원관리</span>
						</h2>
					</div>
				</div>
			</div>
			<!-- main-shortCut -->
			<div id="main-shortCut">
				<!-- sub-main-section -->
				<div class="sub-main-section c5030">
					<!-- listTab mainTab -->
					<ul class="listTab mainTab">
						<li>
							<ul class="ul-tab main-tab tab-content">
								<div class="">
									<div class="ticket-list" id="divTicket">
										<!-- item -->
										<div class="item">
											<table summary="회원관리 목록" style="margin-left: 0;">
												<caption>회원관리 목록</caption>
												<colgroup>
													<col width="*">
													<col width="16%">
													<col class="col-3" width="25%">
													<col width="20%">
													<col width="15%">
													<col width="7%">
												</colgroup>
												<thead>	
													<tr>
														<td colspan="6" align="right" style="border-top-width:0px none;">												
															<span class="selected-text"></span>
															<select id="search_select" name="search_select" class="target">
																<!-- <option value=""></option> -->
																<option value="search_all" selected>통합검색</option>
																<option value="search_id">아이디</option>
																<option value="search_name">이름</option>
															</select>
															<input type="text" id="search_text" name="search_text" style="background-position:135px 50%;width:80px;">
															<a href="javascript:search();"><input type="button" id="select_button" class="button h50 w50 white" value="검색"></a>
															<a href="/spring-GOP/admin/member/management"><input type="button" id="select_button" class="button h50 w50 white" value="모두보기"></a>
														</td>
													</tr>
												<tr>
													<th scope="col" class="col-1"><span>아이디</span></th>
													<th scope="col" class="col-2"><span>이름</span></th>
													<th scope="col" class="col-3"><span>이메일</span></th>
													<th scope="col" class="col-4"><span>핸드폰번호</span></th>
													<th scope="col" class="col-5"><span>생일</span></th>
													<th scope="col" class="col-6"><span> </span></th>
												</tr>
												</thead>
												<tbody>
													<!-- 회원정보 리스트 출력 -->

														<c:forEach var="member" items="${list}"  varStatus="idx" >
															<tr>
																<td>${member.getMember_id()}</td>
																<td>${member.getMember_name()}</td>
																<td>${member.getMember_email()}</td>
																<td>${member.getMember_phone()}</td>
																<td>${member.getMember_birth()}</td>
																<td>
																	<a href="#" onclick="javascript:delMember('${idx.index}')">																															
																		<input type="button" id="outButton" class="button h40 w40 orange" value="탈퇴" >
																		<input type="hidden" id="outM${idx.index}" value="${member.getMember_id()}">																						
																	</a>
																</td>
															</tr>															
														</c:forEach>													
													<!-- //회원정보 리스트 출력 -->
												</tbody>	
											</table>										
										</div>			
										<!-- //item -->							
									<div class="page-box margin-top40"></div>
									</div>
								</div>
							</ul> 
							<!-- //main-tab tab-content -->
						</li>
					</ul>
					<!-- //listTab mainTab -->
				</div>
				<!-- //sub-main-section -->
			</div>
			<!-- //main-shortCut -->
		</div>
		<!-- //content -->
	</div>
	<!-- //container -->
	</form>
</body>
</html>